home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01lab1.zip / ADAWKBK / SOL1-5.ADA < prev    next >
Text File  |  1992-11-11  |  557b  |  31 lines

  1. -- Problem 1.5
  2. -- by Rick Conn
  3. with Text_IO;
  4. procedure Reserved_Demo is
  5.  
  6.   package Int_IO is new Text_IO.Integer_IO (Integer);
  7.  
  8. begin
  9.  
  10.   for I in 1 .. 15 loop
  11.  
  12.     if I < 6 then
  13.       Int_IO.Put (I, 2);
  14.     elsif I = 6 then
  15.       Int_IO.Put (I, 2);
  16.       Text_IO.New_Line;
  17.     elsif I < 10 then
  18.       Int_IO.Put (I, 2);
  19.     elsif I = 10 then
  20.       Int_IO.Put (I, 3);
  21.       Text_IO.New_Line;
  22.     else
  23.       Text_IO.Put ("Too Big: ");
  24.       Int_IO.Put (I, 3);
  25.       Text_IO.New_Line;
  26.     end if;
  27.  
  28.   end loop;
  29.  
  30. end Reserved_Demo;
  31.